package com.bestdreamer.base;

public class MainClass {

    public static void main(String[] args){
        Person person = new Person();
        // 注册观察者
        person.addObserver(new MyObServer());
        person.addObserver(new MyObServer());
        System.out.println(person.countObservers());
        person.setName("haokairong");
        person.setSex("man");
        person.setAge(29);
    }
}
